package com.example.leetcode;

public class HW14 {
    public static void main(String[] args) {
        String s= "abcd";
        char[] chars =s.toCharArray();
        StringBuilder stringBuilder = new StringBuilder();

        for (int i=chars.length;i>0;i--){
            stringBuilder.append(String.valueOf(chars[i-1]));
        }
        System.out.println(stringBuilder.toString());
    }
}
